ref(scm): Implement sentry-scm dependency#112969
Conversation
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
Sentry Snapshot Testing
|
Backend Test FailuresFailures on
|
…/getsentry/sentry into cmanallen/implement-scm-platform
|
|
||
| return "wrong secret" | ||
| server = RpcServer( | ||
| secrets=settings.SCM_RPC_SHARED_SECRET or [], |
There was a problem hiding this comment.
Potential authentication bypass when SCM_RPC_SHARED_SECRET is not configured
The endpoint passes settings.SCM_RPC_SHARED_SECRET or [] to the external RpcServer, which could result in an empty secrets list if the setting is not configured. The previous implementation explicitly raised RpcAuthenticationSetupException when secrets were missing, ensuring requests would fail. The behavior of RpcServer with an empty secrets list cannot be verified (external code) - it may either reject all requests (safe) or skip authentication (vulnerable). This is a behavioral change from explicit failure to unknown behavior.
Verification
Verified by reading the diff showing the old code raised RpcAuthenticationSetupException when SCM_RPC_SHARED_SECRET was not set (lines 32-35 and 82-85 in the old code). The new code at line 18 uses settings.SCM_RPC_SHARED_SECRET or [] which defaults to an empty list. Tests in test_scm_rpc.py always use @override_settings(SCM_RPC_SHARED_SECRET=[...]) so the empty secrets scenario is not tested. The RpcServer class is from external package scm.rpc.server and its behavior with empty secrets cannot be verified.
Identified by Warden sentry-security · HE7-XD7
Backend Test FailuresFailures on
|
No description provided.